﻿using CandyMergeTool.Internals;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CandyMergeTool.Model
{
    public class Movement
    {
        private readonly Cell m_source;
        private readonly Cell m_destination;
        private readonly Direction m_direction;
        private readonly ActionResult m_actionResult;

        public Movement(Cell source, Cell destination, Direction direction, ActionResult actionResult)
        {
            m_source = source;
            m_destination = destination;
            m_actionResult = actionResult;
            m_direction = direction;
        }

        public Cell Source { get { return m_source; } }
        public Cell Destination { get { return m_destination; } }
        public ActionResult ActionResult { get { return m_actionResult; } }
        public Direction Direction { get { return m_direction; } }

        public bool SameMovementAs(Movement other)
        {
            return this.m_source == other.m_source &&
                   this.m_destination == other.m_destination &&
                   this.m_direction == other.m_direction;
        }
    }
}
